package com.study.group.config.datasources;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Properties;

/**
 * @Description 加载数据源 配置类
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/19 14:09
 * @Version     v1
 **/
@Component
@ConfigurationProperties(prefix = "spring.datasource")
public class MatchProperties implements InitializingBean {

    private List<Properties> source;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(this.source);
    }

    public List<Properties> getSource() {
        return source;
    }

    public void setSource(List<Properties> source) {
        this.source = source;
    }
}
